using GeneratorCustomization;

namespace Descriptors.GeneratorCustomization
{
    /// <summary>
    /// Summary description for ExcludedTableColumn.
    /// </summary>
    public class ExcludedTableColumn : SpecialColumn
    {
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="database">Name of the database the table is in.</param>
        /// <param name="table">Name of the table the column is in.</param>
        /// <param name="column">Name of the column.</param>
        /// <remarks>Only the Column name is mandatory. If the table name is not supplied then the 
        /// exclusion should apply for ALL tables. Same is true for the database, if it is not
        /// supplied then the exclusion will apply for all tables in all databases.</remarks>
        private ExcludedTableColumn(string database, string table, string column) : base(database, table, column)
        {
        }

        /// <summary>
        /// Instantiate a new excluded table column with all required fields.
        /// </summary>
        /// <param name="database">Name of the database the table is in.</param>
        /// <param name="table">Name of the table the column is in.</param>
        /// <param name="column">Name of the column.</param>
        /// <returns></returns>
        public static ExcludedTableColumn Build(string database, string table, string column)
        {
            return new ExcludedTableColumn(database, table, column);
        }

        #region Nested type: Testing

        /// <summary>
        /// Support methods for testing use only
        /// </summary>
        public class Testing
        {
            /// <summary>
            /// Get the test excluded column. Details are:-
            /// TestDatabase; TestTable; TestColumn
            /// </summary>
            /// <returns></returns>
            public static ExcludedTableColumn GetTestColumn()
            {
                return Build("TestDatabase", "TestTable", "TestColumn");
            }
        }

        #endregion
    }
}